<!-- <page-header-wrapper [title]="'退款记录'">
</page-header-wrapper>

<nz-card class="search-box" nzBordered>
    <div nz-row nzGutter="8">
        <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
            <sf #sf [schema]="searchSchema"
                [ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24,gutter:15 } }}" [compact]="true"
                [button]="'none'"></sf>
        </div>
        <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
            class="text-right">
            <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
            <button nz-button (click)="resetSF()">重置</button>
            <button nz-button (click)="exprot()"> 导出</button>
            <button nz-button nzType="link" (click)="expandToggle()">
                {{ !_$expand ? '展开' : '收起' }}
                <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
            </button>
        </div>
    </div>
</nz-card> -->

<nz-card class="table-box">
    <div class="tab_header">
        <label class="page_title">
            <label class="driver">|</label>
            退款记录</label>
        <nz-tabset [nzTabBarExtraContent]="extraTemplate">
            <nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"> </nz-tab>
            <nz-tab nzTitle="待审核" (nzClick)="changeRefundStatus('1')"></nz-tab>
            <nz-tab nzTitle="退款中" (nzClick)="changeRefundStatus('4')"></nz-tab>
            <nz-tab nzTitle="退款成功" (nzClick)="changeRefundStatus('2')"></nz-tab>
            <nz-tab nzTitle="退款失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
        </nz-tabset>
    </div>

    <st #st [data]="service.$api_get_refund_record_page" [columns]="columns" [req]="{  process: beforeReq }" [page]="{}"
        [loading]="false" [scroll]="{ x:'1200px',y:scrollY  }">
        <ng-template st-row="orderRefundCode" let-item let-index="index" let-column="column">
            {{ item.orderRefundCode }} <br> {{ item.refundStatusLabel }}
        </ng-template>
        <ng-template st-row="refundAmount" let-item let-index="index" let-column="column">
            <p *ngFor="let cost of item.billRefundDetailVOS"
                style="display: flex;align-items: center;justify-content: space-between;margin: 0;">
                <label> {{cost.costName}}：</label><label>{{ cost.refundAmount |currency }}</label>
            </p>
        </ng-template>
        <ng-template st-row="billRefundPaymentVOS" let-item let-index="index" let-column="column">
            <ng-container *ngFor="let bill of item.billRefundPaymentVOS">
                {{ bill.paymentApplicationCode }}<br>
            </ng-container>
        </ng-template>
        <ng-template st-row="driver" let-item let-index="index" let-column="column">
            {{ item.driverName }} <br> {{ item.driverTelephone }}<br>{{ item.driverLicencePlate }}
        </ng-template>
        <ng-template st-row="captain" let-item let-index="index" let-column="column">
            {{ item.captainName }} <br> {{ item.captainTelephone }}
        </ng-template>
    </st>
</nz-card>

<ng-template #extraTemplate>
    <div class="mr-sm">
        <button nz-button nzDanger (click)="openDrawer()" class="mr-sm">筛选</button>
        <button nz-button nzDanger [disabled]="service.http.loading" (click)="exprot()">导出</button>
    </div>
</ng-template>

<ng-template #auditModal>
    <div nz-row nzGutter="8">
        <div nz-col nzSpan="24" se-container [labelWidth]="80">
            <se [col]="1" label="备注">
                <textarea nz-input rows="3" [(ngModel)]="msg" placeholder="通过可以不用填写原因 ，拒绝必须说明原因"
                    style="width: 325px;margin-left: 14px;"></textarea>
            </se>
        </div>
    </div>
</ng-template>